package com.yc.damai.mapper;

import com.yc.damai.entity.Product;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ly
 * @since 2022-11-01
 */
public interface ProductMapper extends BaseMapper<Product> {

    @Update("update product set store = store - #{count}" +
            " where pid = #{pid}")
    void updateStore(@Param("pid") int pid, @Param("count") int count);

}
